#include "app_device.h"
#include "app_mqtt.h"
#include "app_pool.h"
#include "log.h"
#include "unistd.h"
#include "app_bt.h"

int main(int argc, char const *argv[])
{
    // 1.初始化mqtt
    int ret = app_mqtt_init();
    if (ret == 0)
    {
        log_info("app_mqtt_init success");
    }

    // 2.初始化线程池
    ret = app_pool_init();
    if (ret == 0)
    {
        log_info("app_pool_init success");
    }
    // 3.初始化设备模块
    app_device_t *app_device = app_device_init();
    if (app_device != NULL)
    {
        app_bt_init(app_device);
        log_info("app_device_init success");
        app_decive_start();
    }
    while (1)
    {
        sleep(1);
    }

    return 0;
}
